﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class Admin_CreateUser : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void btnSave_Click(object sender, EventArgs e)
    {
        MembershipUser member = Membership.GetUser(txtName.Text);
        if (member == null)
        {
            Membership.CreateUser(txtName.Text, txtPassword.Text);
            ltMessage.Text = "Tạo tài khoản thành công";
        }
        else
            ltMessage.Text = "Tài khoản đã tồn tại";
    }
}